<template>
	<view class="content">
		<view v-for="(elem,index) in count" :key="index">
			{{elem.id}}-{{elem.userName}}-{{elem.addr}}-{{elem.age}}1111
			<view class="bg-v" :style="{'background-color': elem.color}"></view>
			<image style="width: 100rpx;height: 100rpx;" :src="elem.img" mode=""></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				count: []
			}
		},
		onLoad() {
			this.getMockData()
		},
		methods: {
			getMockData() {
				this.$api.mockReqTest().then(
					(res) => {
						this.count = res.list
						console.log(this.count)
					}
				)
			}
		}
	}
</script>

<style>
.bg-v{
	width: 200rpx;
	height: 200rpx;
}

</style>
